package com.hd.openapi.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class UserToken implements Serializable {
    private Integer id;

    private Integer appid;

    private Integer cusId;

    private String accessToken;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date expireTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date startTime;

    private static final long serialVersionUID = 1L;

    public UserToken(Integer id, Integer appid, Integer cusId, String accessToken) {
        this.id = id;
        this.appid = appid;
        this.cusId = cusId;
        this.accessToken = accessToken;
    }
}